docs(ams): port docs/env-reference.md to a generated website docs page (docs.ams-env-reference.tsx) - #6376
Conversation
…e (docs.ams-env-reference.tsx) Extend packages/loopover-miner/scripts/generate-env-reference.mjs to also emit apps/loopover-ui/src/lib/ams-env-reference.ts (AMS_ENV_REFERENCE_ROWS + AMS_ENV_REFERENCE_MARKDOWN), mirroring scripts/gen-selfhost-env-reference.mjs's renderSelfHostEnvReferenceModule exactly. npm run miner:env-reference(:check) now writes/verifies both the existing markdown doc and the new TS module, so a new LOOPOVER_MINER_*/MINER_* read still fails CI drift-check until both are regenerated. packages/loopover-miner/docs/env-reference.md is untouched in content (still generator-owned, "do not edit manually") and stays the canonical source shipped in the npm package. Add content/docs/ams-env-reference.mdx, which imports AMS_ENV_REFERENCE_MARKDOWN and renders it via <CodeBlock>, the same pattern docs.self-hosting-configuration.tsx already uses for SELFHOST_ENV_REFERENCE_MARKDOWN -- not a hand-copied table. Add the page to docs-nav.tsx's "AMS: deployment" subgroup and to docs.index.tsx's Maintainers audience card, and repoint ams-operations-runbook.mdx's and ams-config-precedence.mdx's GitHub-blob env-reference.md cross-references to the new in-app route. Extend test/unit/miner-env-reference-script.test.ts with module-generation and drift-detection tests mirroring test/unit/selfhost-env-reference-script.test.ts.
… module-generation exports Root tsc --noEmit resolves types for generate-env-reference.mjs from its hand-maintained .d.mts sidecar, not from the .mjs source -- the sidecar was missed when renderMinerEnvReferenceModule/writeMinerEnvReferenceModule/ DEFAULT_MODULE_OUTPUT_PATH were added, so root typecheck failed with "has no exported member" even though the .mjs implementation was correct.
…eration time The project's Prettier config prefers double quotes (singleQuote: false) but still switches a given string to single quotes when that needs fewer escapes. Every markdown line whose row has a quoted-string defaultValue (rendered as `""` / `"production"` in the table) embeds literal double quotes, so JSON.stringify-ing that line (always double-quoted) produced output ui:lint's prettier/prettier rule immediately flagged as needing single-quote reformatting -- and since this file is generated, a one-off --fix would just be undone by the next `npm run miner:env-reference`. Replicate Prettier's fewer-escapes quote choice in the generator itself (quoteJsStringLiteral), so a fresh run's output is already lint-clean.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6376 +/- ##
=======================================
Coverage 95.60% 95.60%
=======================================
Files 599 599
Lines 47221 47221
Branches 15024 15024
=======================================
Hits 45147 45147
Misses 1290 1290
Partials 784 784
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-16 05:23:55 UTC
Review summary Nits — 1 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual previewClick any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-code)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |








Summary
packages/loopover-miner/scripts/generate-env-reference.mjsto also emitapps/loopover-ui/src/lib/ams-env-reference.ts(AMS_ENV_REFERENCE_ROWS+AMS_ENV_REFERENCE_MARKDOWN), mirroringscripts/gen-selfhost-env-reference.mjs'srenderSelfHostEnvReferenceModuleexactly.npm run miner:env-reference(:check) now writes/verifies both the existing markdown doc and the new TS module, so a newLOOPOVER_MINER_*/MINER_*read still fails CI drift-check until both are regenerated.packages/loopover-miner/docs/env-reference.mdis untouched in content (still generator-owned, "do not edit manually") and stays the canonical source shipped in the npm package — no hand-written pointer note added to it, since the generator would just flag it as stale.content/docs/ams-env-reference.mdx, which importsAMS_ENV_REFERENCE_MARKDOWNand renders it via<CodeBlock>— the same patterndocs.self-hosting-configuration.tsxalready uses forSELFHOST_ENV_REFERENCE_MARKDOWN— not a hand-copied table, per the issue's explicit requirement.apps/loopover-ui/src/routes/docs.ams-env-reference.tsx, a thin loader +docsClientLoaderroute matching every other migrated docs page.docs-nav.tsx's "AMS: deployment" subgroup and todocs.index.tsx's Maintainers audience card, and repointsams-operations-runbook.mdx's andams-config-precedence.mdx's GitHub-blobenv-reference.mdcross-references to the new in-app route.test/unit/miner-env-reference-script.test.tswith module-generation and drift-detection tests mirroringtest/unit/selfhost-env-reference-script.test.ts.Two follow-on fixes landed in separate commits after the initial gate run surfaced them:
packages/loopover-miner/scripts/generate-env-reference.d.mts(a hand-maintained sidecar declaration file) needed the new exports added — roottsc --noEmitresolves types for.mjsfiles from their.d.mtssidecar, not the implementation, so it failed with "has no exported member" until the sidecar was updated.`""`/`"production"`in the table) contain literal double quotes;JSON.stringify-ing those lines always double-quotes the JS string literal, whichui:lint'sprettier/prettierrule then flags for reformatting to single quotes (fewer escapes) despite the project'ssingleQuote: falsedefault. Since this is a generated file, a one-off--fixwould be undone by the nextnpm run miner:env-reference— fixed by replicating Prettier's fewer-escapes quote choice directly in the generator (quoteJsStringLiteral).Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally —packages/loopover-miner/scripts/**is outside vitest's coverage-collection scope (onlysrc/**,packages/loopover-engine/src/**, andpackages/loopover-miner/lib/**are instrumented percodecov.yml's own comment), and the.tsx/.mdxpage is outsidecoverage.include;codecov/patchdoes not apply. New generator behavior is still covered by real unit tests regardless.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderatenpm run miner:env-reference:checkpasses for both generated outputsnpm run test:cirun locally from a cleannpm ciinstall, green: 905 test files / 17,282 tests passed (three full runs total — the first two caught the.d.mtsand Prettier-quoting issues above, both fixed and re-verified)npx eslint apps/loopover-ui/src/lib/ams-env-reference.tsrun directly against the generated output to confirm it's lint-cleanSafety
Notes